/**
 * 
 */
package zaphod.toy.ogametool.core;

import java.util.regex.Pattern;

import zaphod.toy.ogametool.core.model.Colony;


interface IEnterer
{
    static class EnergyEnterer implements IEnterer
    {
        public void enter( Colony c, int value )
        {
            c.energy = value;

        }

        public Pattern getPattern()
        {
            return ScoutParser.energyPattern;
        }
    }

    static class CrystalEnterer implements IEnterer
    {
        public void enter( Colony c, int value )
        {
            c.crystal = value;
        }

        public Pattern getPattern()
        {
            return ScoutParser.crystalPattern;
        }
    }

    static class DeuteriumEnterer implements IEnterer
    {
        public void enter( Colony c, int value )
        {
            c.deuterium = value;
        }

        public Pattern getPattern()
        {
            return ScoutParser.deuteriumPattern;
        }
    }

    static class MetalEnterer implements IEnterer
    {
        public void enter( Colony c, int value )
        {
            c.metal = value;

        }

        public Pattern getPattern()
        {
            return ScoutParser.metalPattern;
        }
    }

    public void enter( Colony c, int value );

    public Pattern getPattern();

    public static IEnterer[] tasks = new IEnterer[]
    { new MetalEnterer(), new CrystalEnterer(), new DeuteriumEnterer(),
        new EnergyEnterer() };

}